/*  File Name	: SockAcceptor.h
 *  Author		: Pang Jiacai
 *	 E-mail		: 823960168@qq.com
 *  Created on	: 2012-4-20
 *  Description:
 */

#ifndef SOCKACCEPTOR_H_
#define SOCKACCEPTOR_H_
#include "SockStream.h"

class SockAcceptor:virtual public Sock
{
public:
	SockAcceptor();
	virtual ~SockAcceptor();

	int open(int port,std::string ip="",int pro_family=AF_INET,
			int type=SOCK_STREAM,int protocol=0,bool reuseaddr=true,int backlog=128);

	int close(void);

	int accept(SockStream *peer,sockaddr *addr);
private:

};

#endif /* SOCKACCEPTOR_H_ */
